my $inPrgSection = 0;

while( <STDIN>){
	if( $inPrgSection == 0 ){
		if( /^PRG=/ ){
			$inPrgSection = 1;
			print $_ ;
			$_ = <STDIN>;
			print $_ ;
			$_ = <STDIN>;
		}
		print $_ ;
	}
	elsif( $inPrgSection == 1) {
		if( /^DRPD=|^MENU=/){
			$inPrgSection = 2;
			print $_ ;
		}
		elsif( /^PRG=/ ){
			print $_ ;
			$_ = <STDIN>;
			print $_ ; #print the HDR line.
			$_ = <STDIN>;
			print $_ ; #print the RSRCE line.
		}
	}
	elsif( $inPrgSection == 2 ){
		print $_ ;
	}
}